#ifndef DATA_H
#define DATA_H

#include <stdio.h>

#include "Vector/vector.03.h"
#include "Color/color.01.h"
#include <vector>


using namespace std;


class Data {
public:
	
	typedef double real;
	
	struct P {
		Vector<real> R;
		Vector<real> V;
		Vector<real> F;
		float pot;
		int type;
	};
	
	vector<P> p;
	int p_size;
	
	class PW {
	public:
		double e;
		double s; 
		double rc1f;
		double rc2; 
		
		
		//private:
		double e12;
		double s2, s6;
		double rc12, rc22;
		//double rfdot02;
		double pirc22rc12;
		void update_derivatives(){
			
			e12 = 12*e;
			
			s2 = pow(s, 2);
			s6 = pow(s, 6);
			
			rc12 = pow(rc2 - 1*(rc2-pow(13.0/7, 1.0/6)*s), 2);    //pow(rc2, 2);
			rc22 = pow(rc2, 2);
			
			pirc22rc12 = M_PI/(rc22-rc12);
		}
	};
	
	static const unsigned int pw_size = 5;
	PW pw[pw_size][pw_size];
	
	void update_derivatives() {
		for (int i=0; i<pw_size-1; i++)
			for(int j=i; j<pw_size; j++) {
				pw[i][j].update_derivatives();
				pw[j][i] = pw[i][j];
			}
	}
	
	struct PT {		
		double m;
		Color color;	
	};
	vector< PT > pt;		

	double mU;
	double lU;
	double tU;
	double vU;
	double eU;
};

#endif
